<template>
  <el-select style="width:100%" size="mini" :value="value" placeholder="请选择" @change="change" :clearable="clearable">
    <slot name="option"></slot>
    <el-option v-for="(item,index) in options" :key="index" :label="item.name" :value="item.type"></el-option>
  </el-select>
</template>
<script>
export default {
  props: {
    clearable: {
      type: Boolean,
      default: false
    },
    value: Number
  },
  data () {
    return {
      pload: false,
      options: [
        {
          type:1,
          name:'纯文本'
        },
        {
          type:2,
          name:'富文本'
        },
        {
          type:3,
          name:'图片'
        },
        {
          type:4,
          name:'相关内容'
        }
      ]
    }
  },
  methods: {
    change (n) {
      this.$emit('input', n)
    }
  }
}
</script>
